#该文件已归档，若无仓库主授权，请勿修改

from tkinter import *

class File_def:
    def load(self,contents):
        try:
            with open('Note.txt') as file:
                contents.delete('1.0', END)
                contents.insert(INSERT,file.read())
                
        except FileNotFoundError:
            pass

    def save(self,contents):
        try:
            with open('Note.txt','w') as file:
                file.write(contents.get('1.0',END))
                
        except FileNotFoundError:
            pass
#File_def类，用于执行文件读写类操作